package jdbc;

import java.sql.Connection;
import java.sql.DriverManager;
import java.sql.SQLException;

public class ConnectionFactory
{

    public static Connection getConexao() throws SQLException
    {
        Connection conexao = null;

        try
        {
            conexao = DriverManager.getConnection("jdbc:mysql://127.0.0.1/agenda", "root", "root");
        }
        catch (Exception e)
        {
            throw new SQLException(e);
        }

        return conexao;
    }
}
